module top_module (
    input [3:1] y,
    input w,
    output Y2);
	
	localparam A=3'b000;
	localparam B=3'b001;
	localparam C=3'b010;
	localparam D=3'b011;
	localparam E=3'b100;
	localparam F=3'b101;
	
	always@(*)begin
		case(y)
			A:begin
				Y2=1'b0;
			end
			B:begin
				Y2=1'b1;
			end
			C:begin
				Y2=w;
			end
			D:begin
				Y2=1'b0;
			end
			E:begin
				Y2=w;
			end
			F:begin
				Y2=1'b1;
			end
		endcase
	end
endmodule